<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/header.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>重置密码</title>
<script type="text/javascript">
if("${error}"=="0"){
	   closeMyDialog({flag:true});
	 }else if("${error}"=="1"){
	   myAlert("错误信息","${msg}","e");
	 }
   function login(){
		 //md5加密传输  
	    var salt="{*nbsjt*asar#cdxd#}";  
	    var pwd=$('#userPwd').val();
	    var pwd2=$('#userPwd2').val();
	    var reg=/^(?!(?:[^a-z]+|\D+|[^A-Z]+|\D+|[^0-9]+|\D+|[a-zA-Z0-9]+)$).{8,20}$/;
	    if(pwd&&pwd2){
	     //var md5Pwd=b64_md5(pwd+salt);
	     //var md5Pwd2=b64_md5(pwd2+salt);
	       $('#userPwd').val('************');
	       $('#userPwd2').val('************');
	       $('#userPassword').val(pwd);
	       $('#userPassword2').val(pwd2);
	     $("form").submit();
	    }
	}
   
	 $(function(){
		 $("#cancelBtn").click(function(){
    		 closeMyDialog();
    	 });
	     $("#saveBtn").click(function(){
	    	 login();
		     });
		 });
</script>
</head>
<body class="easyui-layout">
    <div data-options="region:'north',border:false" class="editHeadDiv"><span class="icon-tip">&nbsp;&nbsp;&nbsp;</span>&nbsp;提示信息：<font class="requiredmark">*</font>为必填字段！</div>
    <div data-options="region:'center',border:false" class="editContDiv">
      <form action="${base}sysUser/resetPwd" class="easyui-form" method="post" data-options="novalidate:true">
      <input name="id" type="hidden" value="${id}"/>
           <table class="editTable">
           <tr>
               <th><font class="requiredmark">*</font>新密码：</th><td>
                  <input class="easyui-textbox" id="userPwd"  data-options="required:true" type="password" />
                  <input name="userPassword" id="userPassword"  type="hidden" />
                 </td>
           </tr>
           <tr>
                  <th><font class="requiredmark">*</font>确认密码：</th><td>
                   <input class="easyui-textbox"   id="userPwd2"  data-options="required:true" type="password" /></td>
                  <input name="userPassword2" id="userPassword2"  type="hidden" />
           </tr>
    </table>
    </form>
    </div>
	<div data-options="region:'south',border:false" class="editBtnDiv">
	    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="width:60px;" id="saveBtn">保存</a>
		<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" style="width:60px;" id="cancelBtn">取消</a>
	</div>
</body>
</html>